package Work0603;

import java.io.*;
import java.util.Scanner;

/**
 * 1：输入一个文件名，把其内容用byte的方式输出，用单字节的方式
 * 
 * @param args
 */
public class ByteOutput {

	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);
		System.out.println("输入一个文件名：");
		String a = in.next();
		File q = new File(a);
		InputStream qv = new FileInputStream(q);
		int ch;
		while ((ch = qv.read()) != -1) {
			System.out.print(ch + " ");
		}
		qv.close();

	}

}
